<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>RTS Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">RTS Instruction<BR>
</h1>
<hr noshade></h1>
<span class="text"><BR>
The instruction RTS (ReTurn from Subroutine) does the opposite to the instructions BSR (Branch to SubRoutine) and JSR (Jump to SubRoutine). The longword on top of the stack is stored in the program counter. The instruction is used when ending a subroutine. The execution will return to the instruction that follows the last JSR- or BSR- instruction.<BR>
        <BR>
ADDRESS METHODS: None<BR>
<BR>
DATA LENGTH: N/A<BR>
        <BR>
FLAGS: Unaffected<BR>
<BR>
SYNTAX: RTS<BR>

  </span>
<p><span class="text">EXAMPLE CODE:&nbsp;&nbsp;&nbsp; </span></p>
<p class="sourcecode"><span class="text">&nbsp;&nbsp;&nbsp; RTS&nbsp;&nbsp;&nbsp; 
 
returns to the address stored on the top of the stack</span></p>
</body>
</html>